Backend unused code#1749
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
💤 Files with no reviewable changes (12)
📝 WalkthroughWalkthroughThis pull request removes eleven exported functions and one enum member across multiple backend modules, including AI core tools, message builders, environment variable helpers, and the personal table settings delete use case along with its supporting interfaces and controller endpoint. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
Pull request overview
This PR removes unused backend helpers, AI utility functions, and a personal table settings DELETE use case/endpoint to reduce dead code and simplify the backend surface area.
Changes:
- Removed unused helpers (
getMasterPwd,getOptionalEnvVariable) and related exports. - Removed the personal table settings delete use case, its DI token wiring, and the controller/module DELETE route.
- Removed unused AI-core utility functions (
createSimpleMessages,sanitizeJsonString,createTableSettingsSystemPrompt,createTableAnalysisTools).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| backend/src/helpers/index.ts | Removes unused helper export. |
| backend/src/helpers/get-master-password.ts | Deletes unused helper implementation. |
| backend/src/helpers/app/get-requeired-env-variable.ts | Removes unused optional env var accessor. |
| backend/src/entities/table-settings/personal-table-settings/use-cases/personal-table-settings.use-cases.interface.ts | Removes unused delete use case interface. |
| backend/src/entities/table-settings/personal-table-settings/use-cases/delete-personal-table-settings.use.case.ts | Deletes unused delete use case implementation. |
| backend/src/entities/table-settings/personal-table-settings/personal-table-settings.module.ts | Removes DELETE use case provider and DELETE route middleware binding. |
| backend/src/entities/table-settings/personal-table-settings/personal-table-settings.controller.ts | Removes DELETE endpoint and delete use case injection. |
| backend/src/common/data-injection.tokens.ts | Removes unused DI token for deleted use case. |
| backend/src/ai-core/utils/message-builder.ts | Removes unused message helper function export. |
| backend/src/ai-core/tools/query-validators.ts | Removes unused JSON sanitization helper. |
| backend/src/ai-core/tools/prompts.ts | Removes unused system prompt builder. |
| backend/src/ai-core/tools/database-tools.ts | Removes unused tool definition builder. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { | ||
| ICreateUpdatePersonalTableSettings, | ||
| IDeletePersonalTableSettings, | ||
| IFindPersonalTableSettings, | ||
| } from './use-cases/personal-table-settings.use-cases.interface.js'; |
There was a problem hiding this comment.
After removing the DELETE endpoint/use case, the NestJS Delete decorator import at the top of this controller is now unused (no @Delete usage). Please remove it to keep imports accurate and avoid unused-import lint/knip noise.
Summary by CodeRabbit